Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Case order bug #8748

Merged
merged 1 commit into from
May 20, 2022
Merged

Case order bug #8748

merged 1 commit into from
May 20, 2022

Conversation

richardstartin
Copy link
Member

@richardstartin richardstartin commented May 20, 2022

A bug was introduced in #8138 which eliminated the evaluation of never taken then statements, however, it also reversed the case order of precedence. This fixes this regression, but also adds a test to assert that correct case precedence is observed.

Fixes #8747

@codecov-commenter
Copy link

codecov-commenter commented May 20, 2022

Codecov Report

Merging #8748 (2af9c00) into master (b672af1) will increase coverage by 6.82%.
The diff coverage is 100.00%.

@@             Coverage Diff              @@
##             master    #8748      +/-   ##
============================================
+ Coverage     62.81%   69.64%   +6.82%     
- Complexity     4556     4613      +57     
============================================
  Files          1679     1730      +51     
  Lines         88125    90321    +2196     
  Branches      13198    13424     +226     
============================================
+ Hits          55354    62900    +7546     
+ Misses        28801    23059    -5742     
- Partials       3970     4362     +392     
Flag Coverage Δ
integration1 26.87% <100.00%> (?)
integration2 25.22% <100.00%> (?)
unittests1 66.20% <100.00%> (+0.01%) ⬆️
unittests2 14.25% <0.00%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...ator/transform/function/CaseTransformFunction.java 61.83% <100.00%> (+7.68%) ⬆️
...che/pinot/segment/spi/index/reader/Dictionary.java 82.14% <0.00%> (-13.70%) ⬇️
...t/local/segment/index/readers/FloatDictionary.java 91.66% <0.00%> (-8.34%) ⬇️
.../local/segment/index/readers/DoubleDictionary.java 91.66% <0.00%> (-8.34%) ⬇️
...egment/local/function/GroovyFunctionEvaluator.java 93.33% <0.00%> (-6.67%) ⬇️
.../helix/core/minion/MinionInstancesCleanupTask.java 77.27% <0.00%> (-4.55%) ⬇️
...g/apache/pinot/spi/utils/IngestionConfigUtils.java 73.33% <0.00%> (-2.73%) ⬇️
...ata/manager/offline/DimensionTableDataManager.java 82.14% <0.00%> (-2.48%) ⬇️
...r/api/resources/PinotIngestionRestletResource.java 55.26% <0.00%> (-1.15%) ⬇️
...he/pinot/segment/local/utils/SegmentPushUtils.java 12.70% <0.00%> (-0.22%) ⬇️
... and 424 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b672af1...2af9c00. Read the comment docs.

@richardstartin richardstartin force-pushed the case-order-bug branch 5 times, most recently from ab1c2b5 to 7114733 Compare May 20, 2022 12:36
_elseThenStatements.add(arguments.get(i));
}
_selections = new boolean[_elseThenStatements.size()];
Collections.reverse(_elseThenStatements);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a comment here to indicate the reasoning?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good suggestion, I'll follow up with cosmetic enhancements but want to get this merged quickly given the nature of the bug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Case statement doesn't result in short circuiting
4 participants